package day14;

import java.util.ArrayList;

public class Packaging02 {
    public static void main(String[] args) {
        int num=128;
        System.out.println(toBinaryString(num));
    }
    private static String toBinaryString(int num) {
        ArrayList<Integer> list = new ArrayList<>();
        while(num>0){
            int rem=num%2;
            num=num/2;
            list.add(rem);
        }
        return list.reversed().toString();
    }
}
